//
// Created by wyh on 2025-06-14 23:36.
//

#include <iostream>
#include "utility/ini_file.h"

#include <iostream>

using namespace std;
using namespace wyh::utility;

int main(int argc, char **argv) {
    IniFile ini("./main.ini");

    const string &ip=ini["server"]["ip"];
    cout<<ip<<endl;

    int port = ini["server"]["port"];
    cout<<port<<endl;

    ini.set("server", "ip", (char*)"192.168.7.99");
    ini["server"]["port"]=8090;

    ini["profile"]["age"] = 36;
    ini["profile"]["sex"] = (char*)"girl";

    ini.show();

    cout<<"-------------------------"<<endl;

//    ini.remove("profile","age");
    ini.show();

    ini.save("./main.ini");

    return 0;
}
